<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="apple-itunes-app" content="app-id=591578609">
<meta name="viewport" content="width=device-width"/>
<meta name="description" content="筑学堂网校" />
<meta name="keywords" content="筑学堂网校、建筑、考试"/>
<link rel="stylesheet" type="text/css" href="${csspath}/style/share/style.css">
<link rel="stylesheet" type="text/css" href="${csspath}/style/share/h_index.css">
<link rel="stylesheet" type="text/css" href="${csspath}/style/share/home_style.css">
<link rel="stylesheet" type="text/css" href="${csspath}/style/share/alxx.css">
<link rel="stylesheet" type="text/css" href="${csspath}/style/share/kczx.css">
<link rel="stylesheet" type="text/css" href="${csspath}/style/share/zyzx.css">
<link href="${image.server}/images/favicon.ico" type="image/x-icon" rel="shortcut icon" /> 
<!--[if IE 7]>
<link rel="stylesheet" href="/css/font-awesome/css/font-awesome-ie7.min.css">
<![endif]-->

<script type="text/javascript" src="${jspath}/js/share/m.js"></script>
<script src="${jspath}/js/jquery-1.11.1.js" type="text/javascript"></script>
<script src="${jspath}/js/jquery.slideBox.min.js" type="text/javascript"></script>
<title>筑学堂在线</title>
<style type="text/css">
a {
	color:#111;
}
</style>
</head>
<body style="align:center; padding:0;margin:0;clear:both;">
<%@ include file="share_head.jsp" %>
<div class="zyzx_div">
	<div class="alxx_divt01"> <a href="#"><span class="alxx_text03">筑学堂网校资源中心</span> </a> </div>
	<div class="alxx_divt">
		<div class="alxx_div_left">
			<div class="zyzx_div_left01">
				<div class="zyzx_divlt">
					<table width="240px" height="150px">
						<tr width="240px">
							<td height="15px" class="retext02" >热门标签 </td>
						</tr>
						<tr width="240px">
							<td height="90px" valign="top"  class="zyzx_text01"> 
							
							<c:forEach items="${hottags}" var="hottag">
							<a href="/share/resource/tag/${hottag.id} ">${hottag.name} </a>&nbsp;&nbsp;
							</c:forEach>
						 
							 </td>
						</tr>
						<tr width="240px" align="right">
							<td height="10px"> <a href="#">查看标签地图</a> </td>
						</tr>
					</table>
				</div>
				<div class="zyzx_divlb">
					<table width="240px" height="280px">
						<tr width="240px">
							<td height="10px" class="retext02"></td>
						</tr>
						<tr width="240px">
							<td colspan="3" height="15px" width="240px" class="retext02">下载排行 </td>
						</tr>
						<c:forEach items="${downRankList}" var="item">
							<tr width="240px" class="zyzx_text01">
								<td width="10px" height="15px"> <img src="${imgpath}/images/share/zyzx_images/${fn:toLowerCase(item.file_type)}.png"/> </td>
								<td width="200px" height="15px"> <a href="/share/resource/d/${item.share_file_id}">${item.topic}</a> </td>
								<td width="15px" height="15px">${item.down_cnt}</td>
							</tr>
						</c:forEach>						
						<tr width="240px" align="right">
							<td colspan="3" height="10px"> <a href="/share/resource/more/download">更多</a> </td>
						</tr>
					</table>
				</div>
			</div>
			<div class="zyzx_div_left02">
				<div class="zyzx_divm01">
					<table class="zyzx_tab">
						<tr width="240px" >
							<td colspan="4" height="15px" width="240px" ></td>
						</tr>
						<tr width="240px">
							<td colspan="4" height="8px" width="240px" class="retext02" bgcolor="#B3DDDF" >最新上传</td>
						</tr>
						<tr width="240px" >
							<td colspan="4"width="240px" ></td>
						</tr>
						<c:forEach items="${newestList}" var="item">
							<tr width="240px" class="zyzx_text01 zyzx_td01">
								<td width="10px" class="zyzx_td02"></td>
								<td width="10px"> <img src="${imgpath}/images/share/zyzx_images/${fn:toLowerCase(item.file_type)}.png"/> </td>
								<td width="330px"> <a href="/share/resource/d/${item.share_file_id}"> ${item.topic}</a> </td>
								<td width="60px"> <fmt:formatDate value="${item.create_time}" pattern="yyyy-MM-dd"/></td>
							</tr>
						</c:forEach>						
						<tr width="240px" align="right">
							<td width="10px"></td>
							<td colspan="3" style="text-align:right;"> <a href="/share/resource/more/upload">更多</a> </td>
						</tr>
					</table>
				</div>
				<div class="zyzx_divm02">
					<table class="zyzx_tab">
						<tr width="240px" >
							<td colspan="4" width="240px" ></td>
						</tr>
						<tr width="240px">
							<td colspan="4" height="8px" width="240px" class="retext02" bgcolor="#B3DDDF" >热门文件</td>
						</tr>
						<tr width="240px" >
							<td colspan="4" width="240px" ></td>
						</tr>
						<c:forEach items="${hotestList}" var="item">
							<tr width="240px" class="zyzx_text01 zyzx_td01">
								<td width="10px" class="zyzx_td02"></td>
								<td width="10px"> <img src="${imgpath}/images/share/zyzx_images/${fn:toLowerCase(item.file_type)}.png"/> </td>
								<td width="330px"> <a href="/share/resource/d/${item.share_file_id}"> ${item.topic}</a> </td>
								<td width="60px"><fmt:formatDate value="${item.create_time}" pattern="yyyy-MM-dd"/></td>
							</tr>
						</c:forEach>						
						<tr width="240px" align="right">
							<td width="10px"></td>
							<td colspan="3" height="10px" style="text-align:right;"> <a href="/share/resource/more/hot">更多</a> </td>
						</tr>
					</table>
				</div>
			</div>
		</div>
		<div class="zyzx_div_right">
			<div class="alxx_div_righttb" style="font-size:14px;font-weight:blod;color:#111"> 上&nbsp;传&nbsp;资&nbsp;源</div>
			<div class="zyzx_div_rightt">
				<div class="alxx_div_righttbt"> <span class="alxx_div_righttl" > 案例分享达人</span> <span class="alxx_div_righttr"><a href="javascript:void(0);" onclick="expertNext();">换一批</a></span> </div>
				<table style="width:230px;" id="share_expert_table">
					<c:forEach items="${shareExpertList}" var="item">
						<tr height="70px">
							<td width="60px"> <a href="#"><img src="${drmFilePath}cdrmimg/${item.user_himg}?w=50&h=50" ></a> </td>
							<td  valign="top"> <a href="#" >
								<p class="retext05">${item.user_lnm} </p>
								</a> 综合积分：${item.user_integral} </td>
						</tr>
					</c:forEach>					
				</table>
			</div>
		</div>
	</div>
</div>
<%@ include file="share_buttom.jsp" %>
<script type="text/javascript">
var globalVar = {
	expertPageNum : 1,
	expertHasNext : null
};
$(function(){
	globalVar.expertHasNext = '${shareExpertNext}';
	//globalVar.expertPageNum = 1;
});
function expertNext(){
	//alert(globalVar.expertHasNext);
	var $table = $('#share_expert_table');
	if(globalVar.expertHasNext == 'true'){
		$.ajax({
			 url : '/share/resource/expertListAjax/'+(globalVar.expertPageNum + 1),
	       	 dataType : 'json',
	       	 success : function(d,status){
	       		 var html = [];
	       		 $.each(d.shareExpertList,function(i,item){
	       			html.push('<tr height="70px">'+
	       					'<td width="60px"> <a href="#"><img src="${drmFilePath}cdrmimg/'+item.user_himg+'?w=50&h=50" ></a> </td>'+
	       					'<td  valign="top"> <a href="#" ><p class="retext05">'+item.user_lnm+'</p></a> 综合积分：'+item.user_integral+' </td></tr>');
	       		 });
	       		 //alert(html.join(''));
	       		$table.html(html.join(''));
	       		 globalVar.expertPageNum ++;
	       		 //alert(d.shareExpertNext);
	       		 globalVar.expertHasNext = d.shareExpertNext;
	       	 },
	       	 error : function(d){
	       		 alert('请求出错！');
	       	 }
		});
	} else {
		$table.html('无更多数据');
	}
}
</script>
</body>
</html>